package com.yukefms.message;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author Ping
 * @Date 2021/6/25 14:30
 **/
@Component
public class MessageProducer {

    @Autowired
    private KafkaTemplate<String, String> kafkaTemplate;

    public void send(String topic, String content) {
        kafkaTemplate.send(topic, content) ;
    }
}
